﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.popups.collection {
    import net.wooga.pets.models.*;
    import net.wooga.pets.views.popups.*;
    import net.wooga.pets.constants.*;
    import net.wooga.pets.utils.*;

    public class CollectionCompletedPopupMediator extends AbstractPopupMediator {

        public var collectableModel:CollectableModel;

        override public function onRegister():void{
            super.onRegister();
            _popupType = GameConstants.COLLECTION_COMPLETE_POPUP;
            this.setHeader();
            this.setCollection();
        }
        private function setHeader():void{
            addLabel("collectionCompleteHeader showcardGothicFont", "collections_header_completed", null, this.view);
        }
        private function setCollection():void{
            var _local1:SingleCollectionView = (RepriseUtils.addComponent(this.view, "singleCollection", SingleCollectionView) as SingleCollectionView);
            var _local2:String = this.view.data.toString();
            _local1.collection = this.collectableModel.collectableMatrix[_local2];
            _local1.popupType = _popupType;
        }
        private function get view():CollectionCompletedPopupView{
            return ((viewComponent as CollectionCompletedPopupView));
        }

    }
}//package net.wooga.pets.views.popups.collection 
